
#ifndef LTDB_H
#define LTDB_H

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/timeb.h>
#include <stdarg.h>
#include <windows.h>

typedef int sint32;
typedef unsigned int uint32;
typedef short sint16;
typedef unsigned short uint16;
typedef char schar;
typedef unsigned char uchar;
typedef long long int sint64;
typedef unsigned long long int uint64;
typedef int ltbool;
typedef sint32  ltcode;

#ifndef LT64
typedef uint32  uint3264;
#else
typedef uint64  uint3264;
#endif

#define LT_TRUE     1
#define LT_FALSE    0

#ifdef WIN32
#define DllImport   __declspec( dllimport )
#define DllExport   __declspec( dllexport )
#endif

void err_debug();

#define lt_assert(exp)\
	if (!(exp))\
	{\
        fprintf(stderr, "assert failed! at func : %s, file :%s line:%d\n", __FUNCTION__, __FILE__, __LINE__);\
		err_debug();\
        exit(-1);\
	}

#define LT_ALIGN(n, align) ((n + align - 1) & (~(((uint3264)align) - 1)))

#define LT_MEM_ALIGN_SIZE    (16)

#define NAME_LEN    (256)
#define PATH_LEN    (256)


#endif //#ifndef LTDB_H